package books.borrowing.bo;

import java.util.GregorianCalendar;
import java.util.List;

import javax.xml.datatype.DatatypeConfigurationException;

import books.storage.service.BookDto;
import books.storage.service.EntityNotFoundException_Exception;
import books.storage.service.LiteraryGenreDto;
import books.storage.service.NotEnoughtExemplaireException_Exception;

public interface IBookManagerClientService {

	/**
	 * SEARCH
	 * @throws DatatypeConfigurationException 
	 */

	public List<BookDto> search(GregorianCalendar _first, GregorianCalendar _end)
			throws DatatypeConfigurationException;

	public List<BookDto> searchBookByAuthor(String _authorName);

	public List<BookDto> searchBookByGenre(String _genreName);

	public List<BookDto> searchBookByTitle(String _title);

	/**
	 * BOOKS
	 */

	public BookDto addNewBook(BookDto _book)
			throws EntityNotFoundException_Exception;

	public BookDto findBook(String _ISBN)
			throws EntityNotFoundException_Exception;

	public BookDto updateBook(BookDto _book)
			throws EntityNotFoundException_Exception;

	public void removeBook(BookDto _book)
			throws EntityNotFoundException_Exception;

	public BookDto removeCopies(int _nb, BookDto _book)
			throws EntityNotFoundException_Exception,
			NotEnoughtExemplaireException_Exception;

	public BookDto addCopies(int _nb, BookDto _book)
			throws EntityNotFoundException_Exception;

	public List<BookDto> findAllBooks();

	/**
	 * LITERARY GENRE
	 */

	public LiteraryGenreDto addNewLiteraryGenreDto(LiteraryGenreDto _genre)
			throws EntityNotFoundException_Exception;

	public LiteraryGenreDto findLiteraryGenreDto(Integer _id)
			throws EntityNotFoundException_Exception;

	public LiteraryGenreDto updateLiteraryGenre(LiteraryGenreDto _genre)
			throws EntityNotFoundException_Exception;

	public void removeLiteraryGenre(LiteraryGenreDto _genre)
			throws EntityNotFoundException_Exception;

	public List<LiteraryGenreDto> findAllLiteraryGenre();

}